<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;

class SmsController extends Controller
{
    public function verifyCode()
    {
        return response('i is verifyCode');
    }

    public function getToken()
    {
        $data = [
            'name'=>'Summer',
            'password'=>'secret'
        ];
        $token = \Auth::guard('api')->attempt($data);
        return response($token);
    }

    public function test()
    {
        $user = app('Dingo\Api\Auth\Auth')->user();

        return response($user);
    }
}
